package com.zy.design.pattern.single;

/**
 * @author zhaoyi
 * @date 2021/3/29 15:14
 * 单例模式 - 饿汉式 - 基于枚举
 */
public enum EnumSingle {
    INSTANCE;

    public void sayHello() {
        System.out.println(Thread.currentThread().getName() + " hello " + this);
    }
}
